The files in this directory provide the replication code for Bartlett, McCrary, and O'Hara, 2023, The Market Inside the Market: Odd-lot Quotes. The license agreement between the authors and Refinitiv (formerly MayStreet) prohbits sharing data covered by the license agreement; therefore, the code runs with pseudo-data except as otherwise noted below. Prior to running the code, all datasets (listed below) should be moved to a separate directory and the filepath for the directory should be used for the global datapath in the STATA do-files.

Note on pseudo-data. Pseudo-data for the 1736 sample stocks were generated using uniformly distributed random variables for all continuous variables and random 50/50 variables for all binary variables. Due to the 2.5 GB size limit on file sizes for the Dataverse, only one month of data is provided for files using these pseudo-data.

//Datasets//
 All tables and figures were produced using the following 15 datasets contained within the data directory:
	all_orders.dta (created with Refinitiv raw data)
	chg_stocks_pseudo.dta (created with Refinitiv raw data; pseudo-data provided)
	group1_ol_pseudo.csv (created with Refinitiv raw data; pseudo-data provided)
	group1_sip_pseudo.csv (created with Refinitiv raw data; pseudo-data provided)
	group5_ol_pseudo.csv (created with Refinitiv raw data; pseudo-data provided)
	group5_sip_pseudo.csv (created with Refinitiv raw data; pseudo-data provided)
	micros.dta
	no_chg_stocks_pseudo.dta (created with Refinitiv raw data; pseudo-data provided)
	OL_liquidity_pseudo.dta (created with Refinitiv raw data; pseudo-data provided)
	price_discovery.dta (created with Refinitiv raw data; pseudo-data provided)
	RH_pseudo.dta (created with Refinitiv raw data; pseudo-data provided)
	sample.dta (created with TAQ data; actual data provided)
	sp500.dta (created with TAQ data; actual data provided)
	spreads.dta (created with TAQ data; actual data provided)
	Trades 2016-2021.dta (created with TAQ data; actual data provided)

//Table construction//
Tables were built using a combination of STATA and Python. Replication code for each table can be found in the file adjacent to the listed table.

	Table 1: Stata_tables.do
	Table 2: Stata_tables.do
	Table 3: Stata_tables.do
	Table 4: Stata_tables.do
	Table 5: Stata_tables.do
	Table 6: Stata_tables.do
	Table 7: Stata_tables.do
	Table 8: Stata_tables.do
	Table 9: Jupyter-notebook.ipynb
	Table 10: No code utilized; raw data is in table
	Table 11: Stata_tables.do

//Figure construction//
Figures were built using a combination of STATA, Python, and Excel. Replication code and/or Excel files can be found in the file adjacent to the listed figure.

	Figure 1: Figure 1.do
	Figure 2: Figure 2.xlsx (located in the data directory)
	Figure 3: Simple bar chart reflecting data in Table 2
	Figure 4: Figure 4.do
	Figure 5: Jupyter-notebook.ipynb
	Figure 6: Jupyter-notebook.ipynb
	Figure 7: Jupyter-notebook.ipynb
	Figure 8: Jupyter-notebook.ipynb
	Figure 9: Figure 9.do
	Figure 10: Figure 10.xlsx (located in the data directory)

